package us.ajg0702.leaderboards.libs.bungee;

import com.google.common.io.ByteArrayDataOutput;
import com.google.common.io.ByteStreams;
import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.connection.ProxiedPlayer;

import java.util.Collection;


public class BungeeUtils {
    public static void sendCustomData(ProxiedPlayer player, String channel, String... data) {
        Collection<ProxiedPlayer> networkPlayers = ProxyServer.getInstance().getPlayers();

        if (networkPlayers == null || networkPlayers.isEmpty())
            return;
        ByteArrayDataOutput out = ByteStreams.newDataOutput();
        out.writeUTF(channel);
        out.writeUTF(player.getName());
        for (String s : data) {
            out.writeUTF(s);
        }


        player.getServer().sendData("ajqueue:tospigot", out.toByteArray());
    }
}


*Location:D:\User\Xuan\Downloads\ajLeaderboards-1.3.3.jar\\us\ajg0702\leaderboards\libs\bungee\BungeeUtils.class
 *Java compiler version:8(52.0)
         *JD-Core Version:1.1.3
